/* 纯 CSS 美化版本 - 无需 PostCSS */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #fdf4ff 100%);
    min-height: 100vh;
}

#app {
    min-height: 100vh;
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1rem;
    position: relative;
}

/* 标题区域 */
.title-section {
    text-align: center;
    margin-bottom: 3rem;
}

.title-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.title-icon svg {
    width: 2rem;
    height: 2rem;
    color: white;
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1f2937, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 32rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* 主卡片 */
.main-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

/* 上传区域 */
.upload-section {
    padding: 3rem;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.upload-area:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    transform: scale(1.02);
}

.upload-area.drag-over {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    transform: scale(1.05);
}

.upload-icon {
    width: 6rem;
    height: 6rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: rotate(3deg) scale(1.1);
}

.upload-icon svg {
    width: 3rem;
    height: 3rem;
    color: white;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.upload-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.upload-button {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.upload-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

/* 对比区域 */
.comparison-section {
    display: flex;
    min-height: 500px;
}

.image-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.original-panel {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.enhanced-panel {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
}

.panel-separator {
    width: 1px;
    background: linear-gradient(to bottom, transparent, #e5e7eb, transparent);
}

.panel-label {
    position: absolute;
    top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.original-label {
    left: 1rem;
    color: #f59e0b;
}

.enhanced-label {
    right: 1rem;
    color: #3b82f6;
}

.image-container {
    max-width: 100%;
    max-height: 100%;
    position: relative;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 处理按钮 */
.process-section {
    padding: 0 3rem 2rem;
    text-align: center;
}

.process-button {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.process-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

/* 加载状态 */
.loading-section {
    padding: 4rem 3rem;
    text-align: center;
}

.loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.loading-subtitle {
    color: #6b7280;
}

/* 操作栏 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: rgba(249, 250, 251, 0.8);
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.action-button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-button {
    background: #10b981;
    color: white;
}

.download-button:hover {
    background: #059669;
    transform: translateY(-1px);
}

.reset-button {
    background: #6b7280;
    color: white;
}

.reset-button:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .comparison-section {
        flex-direction: column;
    }

    .panel-separator {
        width: 100%;
        height: 1px;
        background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    }

    .main-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .main-container {
        padding: 2rem 1rem;
    }

    .upload-section,
    .process-section {
        padding: 2rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}